home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
bbsutil
/
bsrc_250.zip
/
B_SCRIPT.C
< prev
next >
Wrap
C/C++ Source or Header
|
1991-09-15
|
26KB
|
764 lines
/*--------------------------------------------------------------------------*/
/* */
/* */
/* ------------ Bit-Bucket Software, Co. */
/* \ 10001101 / Writers and Distributors of */
/* \ 011110 / Freely Available<tm> Software. */
/* \ 1011 / */
/* ------ */
/* */
/* (C) Copyright 1987-91, Bit Bucket Software Co., a Delaware Corporation. */
/* */
/* */
/* This module was written by Vince Perriello */
/* */
/* */
/* BinkleyTerm Script Handler Module */
/* */
/* */
/* For complete details of the licensing restrictions, please refer */
/* to the License agreement, which is published in its entirety in */
/* the MAKEFILE and BT.C, and also contained in the file LICENSE.250. */
/* */
/* USE OF THIS FILE IS SUBJECT TO THE RESTRICTIONS CONTAINED IN THE */
/* BINKLEYTERM LICENSING AGREEMENT. IF YOU DO NOT FIND THE TEXT OF */
/* THIS AGREEMENT IN ANY OF THE AFOREMENTIONED FILES, OR IF YOU DO */
/* NOT HAVE THESE FILES, YOU SHOULD IMMEDIATELY CONTACT BIT BUCKET */
/* SOFTWARE CO. AT ONE OF THE ADDRESSES LISTED BELOW. IN NO EVENT */
/* SHOULD YOU PROCEED TO USE THIS FILE WITHOUT HAVING ACCEPTED THE */
/* TERMS OF THE BINKLEYTERM LICENSING AGREEMENT, OR SUCH OTHER */
/* AGREEMENT AS YOU ARE ABLE TO REACH WITH BIT BUCKET SOFTWARE, CO. */
/* */
/* */
/* You can contact Bit Bucket Software Co. at any one of the following */
/* addresses: */
/* */
/* Bit Bucket Software Co. FidoNet 1:104/501, 1:343/491 */
/* P.O. Box 460398 AlterNet 7:491/0 */
/* Aurora, CO 80046 BBS-Net 86:2030/1 */
/* Internet f491.n343.z1.fidonet.org */
/* */
/* Please feel free to contact us at any time to share your comments about */
/* our software and/or licensing policies. */
/* */
/*--------------------------------------------------------------------------*/
/* Include this file before any other includes or defines! */
#include "includes.h"
int nextline (char *);
int get_line (void);
/*--------------------------------------------------------------------------*/
/* Define our current script functions for use in our dispatch table. */
/*--------------------------------------------------------------------------*/
int script_port (void); /* Chang the port being used */
int script_upload (void); /* Upload files */
int script_download (void); /* Download files */
int script_baud (void); /* Set our baud rate to that
* of remote */
int script_xmit (void); /* transmit characters out
* the port */
int script_rawxmit (void); /* transmit characters out
* the port (no translation) */
int script_pattern (void); /* define a pattern to wait
* for */
int script_wait (void); /* wait for a pattern or
* timeout */
int script_dial (void); /* dial the whole number at
* once */
int script_areacode (void); /* transmit the areacode out
* the port */
int script_phone (void); /* transmit the phone number */
int script_carrier (void); /* Test point, must have
* carrier now */
int script_session (void); /* Exit script
* "successfully" */
int script_if (void); /* Branch based on pattern
* match */
int script_goto (void); /* Absolute branch */
int script_timer (void); /* Set a master script
* timeout */
int script_bps100 (void); /* Send BPS/100 to remote
* system */
int script_break (void); /* Send a break to remote
* system */
int script_params (void); /* Set communication
* parameters */
int script_DOS (void); /* Execute a DOS command */
int script_abort (void); /* Abort a script during
* certain hours */
int script_noWaZOO (void); /* Turn off WaZOO for this
* session only */
struct dispatch
{
char *string;
int (*fun) (void);
};
static struct dispatch disp_table[] = {
{"download", script_download},
{"upload", script_upload},
{"baud", script_baud},
{"xmit", script_xmit},
{"rawxmit", script_rawxmit},
{"pattern", script_pattern},
{"wait", script_wait},
{"dial", script_dial},
{"areacode", script_areacode},
{"phone", script_phone},
{"carrier", script_carrier},
{"session", script_session},
{"if", script_if},
{"goto", script_goto},
{"timer", script_timer},
{"speed", script_bps100},
{"break", script_break},
{"comm", script_params},
{"dos", script_DOS},
{"abort", script_abort},
{"port", script_port},
{"NoWaZOO", script_noWaZOO},
#ifndef MILQ
{(char *)NULL, NULL}
#else